<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>剧集修改</title>
<link rel="stylesheet" type="text/css"	href="../static/js/themes/defalut.css">
<link rel="stylesheet" type="text/css"	href="../static/js/themes/public.css">
<link rel="stylesheet" type="text/css"	href="../static/js/themes/ddspstyle.css">
<link rel="stylesheet" type="text/css"	href="../static/js/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"	href="../static/js/themes/icon.css">
<link rel="stylesheet" type="text/css"	href="../static/js/WdatePicker/skin/WdatePicker.css">
<script type="text/javascript" src="../static/js/jquery.min.js"></script>
<script type="text/javascript" src="../static/js/jquery.easyui.min.js"></script>
<script type="text/javascript"	src="../static/js/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../static/js/jquery.validate.js"></script>
<script type="text/javascript" src="../static/js/index.js"></script>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<%
	int f_ssc_id = 0;
	String para = request.getParameter("f_ssc_id");
	if(para != null)
		f_ssc_id = Integer.valueOf(para);
%>
<script type="text/javascript">
	$(function() {
		$.ajax({
			url:"select_series.do?f_ssc_id="+<%=f_ssc_id%>,
			success:function(data) {
				data = JSON.parse(data);
				$("#f_ssc_id").html(data.f_ssc_id);
				$("#f_ssc_name").html(data.f_ssc_name);
				$("#f_ssc_desc").html(data.f_ssc_desc);
				$("#f_ssc_viewindex").html(data.f_ssc_viewindex);
				$("#f_ssc_code").html(data.f_ssc_code);
				$("#f_ssc_isfree").html(data.f_ssc_isfree==1?"免费":"收费");
				$("#f_ssc_obligate1").html(data.f_ssc_obligate1);
				$("#f_ssc_obligate2").html(data.f_ssc_obligate2);
				$("#f_ssc_mediacode").html(data.f_ssc_mediacode);
				var status = "未知";
				if(data.f_ssc_status==1){
					status="有效";
				}else if(data.f_ssc_status==2){
					status="无效";
				}else if(data.f_ssc_status==4){
					status="有效但不可播";
				}
				$("#f_ssc_status").html(status);
			}
		});
		
		$.ajax({
			url:"videourl_list.do?f_cv_relationid="+<%=f_ssc_id%>+"&f_cv_seriesflag=1",
			success:function(data) {
				data = JSON.parse(data);
				for(var i=0;i<data.length;i++) {
					var str = "";
					str+= '<tr class="videoList">';
					str+= '<td style="white-space:nowrap" align="right">'+data[i].f_cr_name +' ' + data[i].f_cp_name +'</td>';
					str+= '<td>';
					str+= '<input type="hidden" name="videoIdValue" value="'+ data[i].f_cv_id+'"/>';
					str+= '<input type="hidden" name="resolutionValue" value="'+data[i].f_cv_resolutionid+'" />';
					str+= '<input type="hidden" name="partnerValue" value="'+data[i].f_cv_partnerid+'"/>';
					str+= '<input style="width:355px;" type="text" name="videoUrl" value="'+data[i].f_cv_videourl+'"/>';
					str+= '<input type="button" onClick="deleteTrVideo(this);" value="删除"/>';
					str+='</td></tr>';
					$("#videoType").parent().append(str);
				}
				$("tr.videoList").each(function(index,element){
					var resolutionValue = $(this).find('input[name="resolutionValue"]').val();
					var partnerValue = $(this).find('input[name="partnerValue"]').val();
					arrayAdd(resolutionValue, partnerValue);
				});
			}
		});
		$("#f_ssc_id").val(<%=f_ssc_id%>);
		
	});
	
</script>
</head>

<body class="overfwidth">
	<div class="barnavtop">您所在的位置：剧集管理 &gt; 剧集详情</div>
	<div id="workspace">
		<!--主体 开始-->
		<div id="container">
			<div class="editspace">
				<form id="contentForm" class="cmxform" enctype="multipart/form-data" name="formName">
					<input id="f_ssc_id" type="hidden" name="f_ssc_id" value=""/>
					<input type="hidden" id="videoJson" name="videoJson" value=""/>
					<legend>剧集详情</legend>
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										剧集名称:
										<font id="f_ssc_name" style="width: 150px;"></font>
									</td>
									<td width="10%" align="left">
										剧集描述:
										<font id="f_ssc_desc" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>

					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										剧集状态:
										<font id="f_ssc_status" style="width: 150px;"></font>
									</td>
									<td width="10%" align="left">
										排序值:
										<font id="f_ssc_viewindex" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										<spring:message code="series_obligate1"/>:
										<font id="f_ssc_obligate1" style="display:block;width:180px;word-wrap:break-word;"></font>
									</td>
									<td width="10%" align="left" style="padding:0!important;">
										<spring:message code="series_obligate2"/>:
										<font id="f_ssc_obligate2" style="display:block;width:180px;word-wrap:break-word;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										视频code:
										<font id="f_ssc_code" style="width:150px;"></font>
									</td>
									<td width="10%" align="left">
										收费状况:
										<font id="f_ssc_isfree" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										播放code_hw:
										<font id="f_ssc_mediacode" style="width:150px;"></font>
									</td>
									<td width="10%" align="left">
										<font  style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										<jsp:include page="../pictures/pictures_info.jsp" flush="true">
											<jsp:param value="剧集" name="picType"/>
											<jsp:param value="<%=f_ssc_id %>" name="f_cp_relationid"/>
										</jsp:include>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr id="videoType">
								</tr>
							</table>
						</div>
					</fieldset>

				</form>
			</div>
		</div>
		<!--主体 结束-->
	</div>
</html>